import java.awt.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ling
 * Date: 2022-04-27
 * Time: 22:56
 */
public class Test1 {
    public static void main(String[] args) {

    }
    public static void main2(String[] args) {
        final Frame f=new Frame("BorderLayout");
        f.setLayout(new BorderLayout());
        f.setSize(300,300);
        f.setLocation(300,200);
        f.setVisible(true);
        Button but1=new Button("one");
        Button but2=new Button("西部");
        Button but3=new Button("南部");
        Button but4=new Button("北部");
        Button but5=new Button("中部");
        f.add(but1,BorderLayout.EAST);
        f.add(but2,BorderLayout.WEST);
        f.add(but3,BorderLayout.SOUTH);
        f.add(but4,BorderLayout.NORTH);
        f.add(but5,BorderLayout.CENTER);
    }
    public static void main1(String[] args) {
        Frame f=new Frame("我的窗体");
        f.setLayout(new FlowLayout(FlowLayout.LEFT,20,30));
        f.setSize(220,300);
        f.setLocation(300,200);
        f.add(new Button("第1个按钮"));
        f.add(new Button("第2个按钮"));
        f.add(new Button("第3个按钮"));
        f.setVisible(true);
    }
}
